<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>009-jQuery对象的常见方法.html</title>
</head>
<body>
	<div class="div1">div1</div>
	<div class="div2">div2</div>
	<div class="div3" data-testkey="qqqq">div3</div>
	<div class="div4">div4</div>
	<div class="div5">div5</div>
</body>
<script src="js/jquery-1.12.4.js"></script>
<script>
	$(function(){
		console.log($('div').index($(document.querySelector('.div3'))));
		$('div').each(function(index,element){
			console.log(this)
		});
		
		// $.each($('div'),function(index,ele){
		// 	console.log(index,ele);
		// })
		
		$('.div2').data('xxx','zzz');
		console.log($('.div2').data("xxx"));
		console.log($('.div3').data("zzz"));
	})
</script>
</html>